Skip to content

Fix ES module resolution for @object-ui/core types subpath#360

Merged
hotlong merged 3 commits intomainfrom
copilot/update-action-workflow-yml
Feb 2, 2026
Merged

Fix ES module resolution for @object-ui/core types subpath#360
hotlong merged 3 commits intomainfrom
copilot/update-action-workflow-yml

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Node.js ES modules don't support directory imports. The @object-ui/core package emits a dist/types/ directory containing type-only exports, but package.json lacked a subpath export for ./types, causing resolution failures:

Error: Directory import '.../node_modules/@object-ui/core/dist/types' is not supported

Changes

  • packages/core/package.json: Added ./types subpath export mapping to dist/types/index.{d.ts,js}
  • .gitignore: Exclude *.bundled_*.mjs temp files from ObjectStack compiler
 "exports": {
   ".": {
     "types": "./dist/index.d.ts",
     "import": "./dist/index.js"
+  },
+  "./types": {
+    "types": "./dist/types/index.d.ts",
+    "import": "./dist/types/index.js"
   }
 }

This enables proper resolution of export type { ... } from './types/index.js' in the compiled output.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21595320458/job/62226065803#step:9:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Canceled Canceled Feb 2, 2026 3:36pm
objectui-components Ready Ready Preview, Comment Feb 2, 2026 3:36pm
objectui-crm-app Error Error Feb 2, 2026 3:36pm

Request Review

Copilot AI and others added 2 commits February 2, 2026 15:26
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update action workflow YAML configuration Fix ES module resolution for @object-ui/core types subpath Feb 2, 2026
Copilot AI requested a review from hotlong February 2, 2026 15:30
@hotlong hotlong marked this pull request as ready for review February 2, 2026 15:45
Copilot AI review requested due to automatic review settings February 2, 2026 15:45
@hotlong hotlong merged commit 9def045 into main Feb 2, 2026
6 of 7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an ES module resolution error by adding a subpath export for the types directory in @object-ui/core. The issue occurred because Node.js ES modules don't support directory imports, and the compiled code contains a re-export statement that references the dist/types/ directory.

Changes:

  • Added ./types subpath export to @object-ui/core/package.json to enable proper resolution of type-only exports
  • Added .gitignore entry for *.bundled_*.mjs temporary files from the ObjectStack compiler

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
packages/core/package.json Added subpath export mapping for ./types pointing to dist/types/index.{d.ts,js} to fix ES module directory import error
.gitignore Added pattern to exclude ObjectStack compiler temporary files (*.bundled_*.mjs) from version control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants